package com.tc.quartz.frame.common;

import java.text.SimpleDateFormat;
import java.util.Locale;

/**
 * date工具类
 * @author yongjin.ye
 *
 */
public class DateUtil {
	
	
	public static String formatDate(Long curr, String pattern){
		if (null ==curr || curr == 0) return "0";
		pattern = null == pattern ? "yyyy-MM-dd HH:mm:ss" : pattern;
		SimpleDateFormat sdf = new SimpleDateFormat(pattern, Locale.SIMPLIFIED_CHINESE);
		//sdf.applyPattern(pattern);
		return sdf.format(curr);
	}
	
}